package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.bean.CartBean;
import com.project.bean.DetailBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单明细Mapper接口
 */
@Mapper
public interface IDetailMapper extends BaseMapper<DetailBean> {
    /**
     * 批量添加订单明细
     * @param orderId 订单号
     * @param cartList 订单明细集合
     */
    public void addMore(@Param("orderId") Integer orderId,@Param("cartList") List<CartBean> cartList);

    /**
     * 通过订单id查询订单明细
     * @param orderId 订单id
     * @return
     */
    public List<DetailBean> findByOrder(Integer orderId);

}
